package com.xoa.controller.attend;

import com.xoa.model.attend.AttendExtraWork;
import com.xoa.service.attend.ExtraWorkService;
import com.xoa.util.ToJson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("extraWorkSet")
public class ExtraWorkSetController {
    @Autowired
    private ExtraWorkService extraWorkService;

    @RequestMapping("/getExtraWorkSetting")
    public String getExtraWorkSetting(){
        return  "app/attend/attendManagement/extraWorkSetting";
    }

    @RequestMapping("/insertExtraWork")
    @ResponseBody
    public ToJson<AttendExtraWork> insertExtraWork(AttendExtraWork extraworkSet){
        return  extraWorkService.insertExtraWork(extraworkSet);
    }

    @RequestMapping("/getExtraWorkById")
    @ResponseBody
    public ToJson<AttendExtraWork> getExtraWorkById(Integer id){
        return  extraWorkService.getExtraWorkById(id);
    }

    @RequestMapping("/deleteExtraWorkById")
    @ResponseBody
    public ToJson<AttendExtraWork> deleteExtraWorkById(Integer id){
        return  extraWorkService.deleteExtraWorkById(id);
    }

    @RequestMapping("/updateExtraWoekSet")
    @ResponseBody
    public ToJson<AttendExtraWork> updateExtraWoekSet(AttendExtraWork extraworkSet){
        return  extraWorkService.updateExtraWoekSet(extraworkSet);
    }

    @RequestMapping("/getExtraWorkList")
    @ResponseBody
    public ToJson<AttendExtraWork> getExtraWorkList(){
        return  extraWorkService.getExtraWorkList();
    }


}
